{include file="overall_header.tpl"}
{if $ismessage == true || $validator == true}
<script>
    {literal}
    function hide()
    {
        var item;
        
        if (document.getElementById)
        {
            item = document.getElementById('infobar');
        }
        else if (document.all)
        {
            item = document.all['infobar'];
        }
        else if (document.layers)
        {
            item = document.layers['infobar'];
        }
        
        if (item && item.style)
        {
            item.style.display = "none";
        }  
        return;
    }
    {/literal}
</script>
{if $ismessage == true}
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="100%"> 
<div {if $usererror != true}id="infobar"{else}id="errorbar"{/if} title="Click to hide"><a href="#" onclick="hide();">{$infomessage}</a></div>
</td> </tr> </table>
{/if}
{elseif $newpm}
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="100%"> 
<div id="infobar"><a href="index.php?page=pmmain">You have a new private message, click here to read it now</a></div>
</td> </tr> </table>
{elseif $nummessagepm > 0}
<table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="100%"> 
<div id="infobar"><a href="index.php?page=pmmain">You have {$nummessagepm} unread private messages, click here to read them now</a></div>
</td> </tr> </table>
{/if}
{if $extra != "nomenu"}
<table id="Table_01" border="0" cellpadding="0" cellspacing="0" style="padding-left:10px;padding-right:10px">
	<tbody><tr style="padding:0px;">
		<td>

			<img src="{$templateinfo.imagedir}header_01.gif" alt="" height="120" width="134" /></td>

		<td width="100%" style="background-image: url({$templateinfo.imagedir}header_02.gif);">
                    {if $menu.top != ""}
        {section name=cats loop=$nummenucats.top}
         <div class="topbutton">
          {section name=itemloop loop=$menu.top[cats].numitems}
           {if $menu.top[cats].items[itemloop].type == 1}
                <a href="index.php?page={$menu.top[cats].items[itemloop].link}" target="{$menu.top[cats].items[itemloop].target}">{$menu.top[cats].items[itemloop].name}</a>
           {elseif $menu.top[cats].items[itemloop].type == 2 || $menu.top[cats].items[itemloop].type == 3}
                <a href="{$menu.top[cats].items[itemloop].link}" target="{$menu.top[cats].items[itemloop].target}">{$menu.top[cats].items[itemloop].name}</a>
           {elseif $menu.top[cats].items[itemloop].type == 4}
                {eval var=$menu.top[cats].items[itemloop].link}
           {/if}
          {/section}
         </div>
        {/section}
        {else}
        &nbsp;
        {/if}
        </td>

		<td>
			<img src="{$templateinfo.imagedir}header_03.gif" alt="" height="120" width="407" /></td>
	</tr>
    <tr>
    <td id="personinfo" align="center" width="150">
       <div style="text-align:left">{eval var=$userdisp}</div>
    </td>
    </tr>
</tbody></table>
{/if}
<table border="0" cellpadding="2" cellspacing="0" width="100%" align="center" style="padding-left:10px;padding-right:10px">
<tbody>
<tr valign="top">
{if $menu.left != "" && $extra != "nomenu"}
<td>
<table id="Table_02" border="0" cellpadding="0" cellspacing="0" width="165">
	<tbody>
          {section name=cats loop=$nummenucats.left}
<tr>
		<td style="background-image: url({$templateinfo.imagedir}menu_01.gif);" height="33" width="165">
             {if $menu.left[cats].showhead}<span style="padding: 15px;">{$menu.left[cats].name}</span>{/if}</td>
	</tr>
	    <tr>
		<td style="padding: 10px; background-image: url({$templateinfo.imagedir}menu_02.gif);" height="100%">


      <div class="buttonscontainer">
      <div class="buttons">
              {section name=itemloop loop=$menu.left[cats].numitems}
               {if $menu.left[cats].items[itemloop].type == 1}
                    <a href="index.php?page={$menu.left[cats].items[itemloop].link}&amp;menuid={$menu.left[cats].items[itemloop].id}" target="{$menu.left[cats].items[itemloop].target}">{$menu.left[cats].items[itemloop].name}</a>
               {elseif $menu.left[cats].items[itemloop].type == 2 || $menu.left[cats].items[itemloop].type == 3}
                    <a href="{$menu.left[cats].items[itemloop].link}" target="{$menu.left[cats].items[itemloop].target}">{$menu.left[cats].items[itemloop].name}</a>
               {elseif $menu.left[cats].items[itemloop].type == 4}
                    {eval var=$menu.left[cats].items[itemloop].link}
               {/if}
               {if $menu.left[cats].items[itemloop].subitems != 0}
                   {section name=subitemloop loop=$menu.left[cats].items[itemloop].subitems}
                       {if $menu.left[cats].items[itemloop].subitem[subitemloop].type == 1}
                           <a href="index.php?page={$menu.left[cats].items[itemloop].subitem[subitemloop].link}&amp;menuid={$menu.left[cats].items[itemloop].subitem[subitemloop].parent}" target="{$menu.left[cats].items[itemloop].target}">&nbsp;&nbsp;{$menu.left[cats].items[itemloop].subitem[subitemloop].name}</a>
                       {elseif $menu.left[cats].items[itemloop].subitem[subitemloop].type == 2 || $menu.left[cats].items[itemloop].subitem[subitemloop].type == 3}
                            <a href="{$menu.left[cats].items[itemloop].subitem[subitemloop].link}" target="{$menu.left[cats].items[itemloop].target}">&nbsp;&nbsp;{$menu.left[cats].items[itemloop].subitem[subitemloop].name}</a>
                       {/if}
                   {/section}
               {/if}
              {/section}
      </div>
      </div>
	</td>
	</tr>
	<tr>
		<td style="background-image: url({$templateinfo.imagedir}menu_03.gif);" height="29" width="165"></td></tr>
		<tr><td>&nbsp;</td></tr>{/section}
</tbody></table>
</td>
{/if}
<td width="100%">
    {if $editable || $addable}<div style="text-align:right;">
		{if $editable == true}<a href="{$editlink}"><img border="0" src="{$templateinfo.imagedir}edit.gif" alt="Edit this item" /></a>{/if}&nbsp;&nbsp;		
        {if $addable == true}<a href="{$addlink}"><img border="0" src="{$templateinfo.imagedir}add.png" alt="Add a new item" /></a>{/if}
    </div>
    {/if}
        {if $dataC == false}
			{include file="$content"}
		{else}
			{eval var=$content}
		{/if}
    {if $extra == "nomenu"}
     <a href="javascript:close()">Close Window</a>
    {/if}
    {if $rssid != ""}
    <div style="text-align:right;">
		<a href="index.php?page=rss&amp;action=feed&amp;uid={$rssid}"><img border="0" src="{$templateinfo.imagedir}rss.png" alt="Site Syndication (RSS Feed)" title="Site Syndication (RSS Feed)" /></a>		
    </div>
    {/if}
   </td>
   {if $menu.left != "" && $extra != "nomenu"}
   <td>
<table id="Table_03" border="0" cellpadding="0" cellspacing="0" width="165">
	<tbody>
          {section name=cats loop=$nummenucats.right}
<tr>
		<td style="background-image: url({$templateinfo.imagedir}menu_01.gif);" height="33" width="165">
             {if $menu.right[cats].showhead}<span style="padding: 15px;">{$menu.right[cats].name}</span>{/if}</td>
	</tr>
	    <tr>
		<td style="padding: 10px; background-image: url({$templateinfo.imagedir}menu_02.gif);" height="100%">


      <div class="buttonscontainer">
      <div class="buttons">
              {section name=itemloop loop=$menu.right[cats].numitems}
               {if $menu.right[cats].items[itemloop].type == 1}
                    <a href="index.php?page={$menu.right[cats].items[itemloop].link}&amp;menuid={$menu.right[cats].items[itemloop].id}" target="{$menu.right[cats].items[itemloop].target}">{$menu.right[cats].items[itemloop].name}</a>
               {elseif $menu.right[cats].items[itemloop].type == 2 || $menu.right[cats].items[itemloop].type == 3}
                    <a href="{$menu.right[cats].items[itemloop].link}" target="{$menu.right[cats].items[itemloop].target}">{$menu.right[cats].items[itemloop].name}</a>
               {elseif $menu.right[cats].items[itemloop].type == 4}
                    {eval var=$menu.right[cats].items[itemloop].link}
               {/if}
               {if $menu.right[cats].items[itemloop].subitems != 0}
                   {section name=subitemloop loop=$menu.right[cats].items[itemloop].subitems}
                       {if $menu.right[cats].items[itemloop].subitem[subitemloop].type == 1}
                            <a href="index.php?page={$menu.right[cats].items[itemloop].subitem[subitemloop].link}&amp;menuid={$menu.right[cats].items[itemloop].subitem[subitemloop].parent}" target="{$menu.right[cats].items[itemloop].target}">&nbsp;&nbsp;{$menu.right[cats].items[itemloop].subitem[subitemloop].name}</a>
                       {elseif $menu.right[cats].items[itemloop].subitem[subitemloop].type == 2 || $menu.right[cats].items[itemloop].subitem[subitemloop].type == 3}
                            <a href="{$menu.right[cats].items[itemloop].subitem[subitemloop].link}" target="{$menu.right[cats].items[itemloop].target}">&nbsp;&nbsp;{$menu.right[cats].items[itemloop].subitem[subitemloop].name}</a>
                       {/if}
                   {/section}
               {/if}
              {/section}
      </div>
      </div>
	</td>
	</tr>
	<tr>
		<td style="background-image: url({$templateinfo.imagedir}menu_03.gif);" height="29" width="165"></td></tr>
		<tr><td>&nbsp;</td></tr>{/section}
</tbody></table>
</td>
{/if}
   </tr>
{if $extra != "nomenu"}
<tr>
<td id="end" colspan="3" align="center">
 <a href="javascript:popuphelp('{$pagename}')">Help Me</a>
 {if ($adminpanel == "Y") && ($uname != "Guest")}<br /><br /><a href="admin.php">Goto Administration Panel</a>{/if}
</td>
</tr>{/if}
</tbody></table>
{include file="overall_footer.tpl"}
